package com.tools.developer.hardware;

import android.app.Activity;
import android.content.pm.ConfigurationInfo;
import android.os.Bundle;
import android.widget.TextView;

import com.tools.developer.R;

public class HardwareActivity extends Activity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_hardware);

		ConfigurationInfo conf = HardwareUtil.getDeviceConfigurationInfo(this
				.getApplicationContext());

		StringBuffer sb = new StringBuffer();
		sb.append("reqGlEsVersion:" + conf.reqGlEsVersion);
		sb.append("\r\n")
				.append(conf.reqInputFeatures
						+ "/"
						+ (conf.reqInputFeatures == 1 ? "INPUT_FEATURE_HARD_KEYBOARD"
								: "INPUT_FEATURE_FIVE_WAY_NAV "));
		sb.append("\r\n").append("getGlEsVersion:" + conf.getGlEsVersion());
		((TextView) findViewById(R.id.txt)).setText(sb.toString());
	}

}
